import axios from 'axios'

//获取手机登录验证码
export const reqPhoneCode = (phone) => {
  return axios({
    method: 'POST',
    url: '/api/login/digits',
    data: {
      phone,
    },
  })
}

//手机号验证码登录
export const reqCodeLogin = (phone, code) => {
  return axios({
    method: 'POST',
    url: '/api/login/phone',
    data: {
      phone,
      code,
    },
  })
}

//手机号密码登录
export const reqPassowordLogin = (phone, password) => {
  return axios({
    method: 'POST',
    url: '/api/login/user',
    data: {
      phone,
      password,
    },
  })
}
